package com.qdlc.p2p.dal.dto;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;

/**
 * VIP等级实体类
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "user_vip_level")
public class UserVipLevel {

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** vip等级值 */
    private int level;

    /** 所需成长值 */
    private double growthValue;

    /** 成长封顶值 */
    private double growthLimitValue;

    /** 额外收益率 */
    private double extraRate;

    /** 赠送红包金额 */
    private double giftMoney;

    /** 是否删除 */
    private boolean isDelete;

    /** 添加时间 */
    private Date addTime;

    /**
     * 红包规则ID
     */
    private long redEnvelopeRuleId;


    /**
     * 操作员
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "operator_id")
    private Operator operator;

    public UserVipLevel() {
    }

    public UserVipLevel(long id) {
        this.id = id;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public double getGrowthValue() {
        return growthValue;
    }

    public void setGrowthValue(double growthValue) {
        this.growthValue = growthValue;
    }

    public double getGrowthLimitValue() {
        return growthLimitValue;
    }

    public void setGrowthLimitValue(double growthLimitValue) {
        this.growthLimitValue = growthLimitValue;
    }

    public double getExtraRate() {
        return extraRate;
    }

    public void setExtraRate(double extraRate) {
        this.extraRate = extraRate;
    }

    public double getGiftMoney() {
        return giftMoney;
    }

    public void setGiftMoney(double giftMoney) {
        this.giftMoney = giftMoney;
    }

    public boolean getIsDelete() {
        return isDelete;
    }

    public void setDelete(boolean isDelete) {
        this.isDelete = isDelete;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Operator getOperator() {
        return operator;
    }

    public void setOperator(Operator operator) {
        this.operator = operator;
    }

    public long getRedEnvelopeRuleId() {
        return redEnvelopeRuleId;
    }

    public void setRedEnvelopeRuleId(long redEnvelopeRuleId) {
        this.redEnvelopeRuleId = redEnvelopeRuleId;
    }
}
